package model;

import java.util.Scanner;

public class User {
	private String usernamwe;//鐢ㄦ埛鍚嶏紱
	private String pass;//瀵嗙爜锛�
	private int role; //瑙掕壊鏍囪瘑     1   鍚冭揣    2  鍟嗗
	private Scanner scan = new Scanner(System.in);
	User(){
		
	}
	public User(String username,String pass,int role){
		this.usernamwe = username;
		this.pass = pass;
		this.role = role;
	}
	//鐢ㄦ埛杈撳叆鐧诲綍鐨勮鑹�
	public int inputRole(){
		return scan.nextInt();
	}
	//鐢ㄦ埛杈撳叆璐﹀彿鍜屽瘑鐮侊紱
	public User inputUser(int role){
		String username = scan.next();
		String pass = scan.next();
		User user = new User();
		user.setUsernamwe(username);
		user.setPass(pass);
		user.setRole(role);
		return user;
	}
	//鐢ㄦ埛杈撳叆鍔熻兘閫夐」
	public int inputService(){
		return scan.nextInt();
	}
	//鐢ㄦ埛杈撳叆鑿滃崟缂栧彿
	public int inputMenu(){
		return scan.nextInt();
	}
	//鐢ㄦ埛杈撳叆鐨勮鍗曚俊鎭�
	public Order inputOrder(){
		System.out.println("璇疯緭鍏ュ鍚嶏細");
		String uname = scan.next();
		System.out.println("璇疯緭鍏ヤ唤鏁帮細");
		int foodNum = scan.nextInt();
		System.out.println("璇疯緭鍏ラ�侀鏃堕棿锛�");
		String odate = scan.next();
		System.out.println("璇疯緭鍏ラ�侀鍦板潃锛�");
		String address = scan.next();
		Order order = new Order();
		order.setAddress(address);
		order.setFoodNum(foodNum);
		order.setOdate(odate);
		order.setUname(uname);
		return order;
	}
	

	
	
	public String getUsernamwe() {
		return usernamwe;
	}
	public void setUsernamwe(String usernamwe) {
		this.usernamwe = usernamwe;
	}
	public String getPass() {
		return pass;
	}
	public void setPass(String pass) {
		this.pass = pass;
	}
	public int getRole() {
		return role;
	}
	public void setRole(int role) {
		this.role = role;
	}
	public Scanner getScan() {
		return scan;
	}
	public void setScan(Scanner scan) {
		this.scan = scan;
	}
	
	
}
